    
        $(function() {
    var signFun = function() {

        var dateArray = [1, 2, 4, 6] // 已经签到的
        
        var $dateBox = $("#js-qiandao-list"),
            $currentDate = $(".current-date"),
            $qiandaoBnt = $("#js-just-qiandao"),
            _html = '',
			_html2 = '',
            _handle = true,
            myDate = new Date();
        $currentDate.text(myDate.getFullYear() + '年' + parseInt(myDate.getMonth() + 1) + '月' + myDate.getDate() + '日');

        var monthFirst = new Date(myDate.getFullYear(), parseInt(myDate.getMonth()), 1).getDay();
		

        var d = new Date(myDate.getFullYear(), parseInt(myDate.getMonth() + 1), 0);
        var totalDay = d.getDate(); //获取当前月的天数

        for (var i = 0; i < 42; i++) {
            _html += ' <li class="tc bg_white   l bde rel " ><div class="qiandao-icon abs"></div></li>'
        }
        $dateBox.html(_html) //生成日历网格

        var $dateLi = $dateBox.find("li");
        for (var i = 0; i < totalDay; i++) {
            $dateLi.eq(i + monthFirst).addClass("date" + parseInt(i + 1));
			var y = i + 1;
			_html2 = ' '+y+'';
			 $dateLi.eq(i + monthFirst).append(_html2);
            for (var j = 0; j < dateArray.length; j++) {
                if (i == dateArray[j]) {
                    $dateLi.eq(i + monthFirst).addClass("qiandao");
                }
            }
        } //生成当月的日历且含已签到

      
       
        $qiandaoBnt.on("click", function() {
           qianDao();
        }); //签到

       
        function qianDao() {
            $(".date" + myDate.getDate()).addClass('qiandao');
        }
    }();

  

})